<template>
    <div>

        <h2>选择地址</h2>
        <el-form :model="addressForm" label-width="80px">
            <el-form-item label="收件人">
                <el-input v-model="addressForm.name"></el-input>
            </el-form-item>
            <el-form-item label="联系电话">
                <el-input v-model="addressForm.phone"></el-input>
            </el-form-item>
            <el-form-item label="收件地址">
                <el-input v-model="addressForm.address"></el-input>
            </el-form-item>
        </el-form>

        <el-button type="primary" @click="confirmOrder">确认订单</el-button>
    </div>
</template>

<script>
export default {
    data() {
        return {
            cartItems: [
                {name: '商品1', price: 10, quantity: 2},
                {name: '商品2', price: 15, quantity: 1},
                {name: '商品3', price: 20, quantity: 3},
            ],
            addressForm: {
                name: '',
                phone: '',
                address: '',
            },
        };
    },
    methods: {
        confirmOrder() {
            // 在这里处理确认订单的逻辑
            console.log('确认订单');
        },
    },
};
</script>